function paySuccess (that) {
    const {type} = that.state
    let text = null
    if(type === "Charge") {
        text = "支付"
    }else if(type === "Recharge") {
        text = "充值"
    }
    return (
        <div className="pay" >
            <div className="paysuccess">
                <div className="content lux-pt200">
                    <div className="img">
                        <img src="//cdn2.jinlb.cn/web/weixinpay/img/success.png" alt="支付成功icon"/>
                    </div>
                    <div className="text lux-mt20">
                        {text}成功
                    </div>
                    <div className="text lux-mt20">
                        感谢使用近邻宝！
                    </div>
                </div>
            </div>
        </div>
    )
}
function payTemplate (that) {
    const {type} = that.state
    let text = null
    if(type === "Charge") {
        text = "支付"
    }else if(type === "Recharge") {
        text = "充值"
    }
    return (
        <div className="pay" >
            <div className="content lux-pt30">
                <div className="desc lux-h88">
                    <img src="//cdn2.jinlb.cn/web/weixinpay/img/logo.png" alt="近邻宝logo"/>
                    <span>近邻宝{text}</span>
                </div>
                <div className="money lux-mt20 lux-h40">
                    ￥{that.state.amount}
                </div>
                <div className="receive lux-h82 lux-mt46">
                    <div className="desc lux-ml50">
                        收款方：
                    </div>
                    <div className="desc lux-mr70">
                        近邻宝
                    </div>
                </div>
                <div className="button lux-mt44 lux-ml20 lux-mr20">
                    <a className="btn lux-h90" href="javascript:;"
                       onClick={that.pay.bind(that)}>立即{text}</a>
                </div>
            </div>
        </div>
    )
}

module.exports = {
    paySuccess,
    payTemplate
}